/**
 * @(#)TestOrganizationServiceImpl.java 2009-11-16
 *   
 * Copyright  (c) 2009-2010 Wilmar IT Service,  Inc.   
 * All  rights  reserved.   
 * TODO
 */

package test.service.process;

import java.util.HashSet;
import java.util.Set;

import com.wilmar.process.core.services.spi.IOrganizationService;
import com.wilmar.process.entity.Organization;
import com.wilmar.process.entity.User;
import com.wilmar.process.exception.DirtyDataException;

/**
 * @author makubex Email:makubexnet@gmail.com
 * @version 1.0.0
 */
public class SimpleOrganizationServiceImpl implements IOrganizationService {

	/*
	 * (non-Javadoc)
	 * 
	 * @seecom.wilmar.process.core.services.api.IOrganizationService#
	 * getListAllOrganizationsByUser(com.wilmar.process.entity.User)
	 */
	public Set<Organization> getListAllOrganizationsByUser(User user) {
		Set<Organization> orgSet = new HashSet<Organization>();
		try {
			orgSet.add(new Organization("wsp-organization-oa"));
//			orgSet.add(new Organization("wsp-organization-ob"));
//			orgSet.add(new Organization("wsp-organization-oc"));
//			orgSet.add(new Organization("wsp-organization-od"));
		} catch (DirtyDataException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return orgSet;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @seecom.wilmar.process.core.services.api.IOrganizationService#
	 * getListAllSubOrganizations(com.wilmar.process.entity.Organization)
	 */
	
	public Set<Organization> getListAllSubOrganizations(
			Organization organization) {
		// TODO Auto-generated method stub
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @seecom.wilmar.process.core.services.api.IOrganizationService#
	 * getOrganizationByCode(java.lang.String, java.lang.String)
	 */
	
	public Organization getOrganizationByCode(String orgCode, String outerSystem) {
		Organization org = null;
		try {
			org = new Organization("wsp-organization-oa");
		} catch (DirtyDataException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return org;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @seecom.wilmar.process.core.services.api.IOrganizationService#
	 * getParentOrganizationByOrganization
	 * (com.wilmar.process.entity.Organization)
	 */
	
	public Organization getParentOrganizationByOrganization(
			Organization organization) {
		// TODO Auto-generated method stub
		return null;
	}

}
